package Parsers;
#use FindBin qw[$Bin];
use Time::localtime;
use Path::Class;
use base qw[ Exporter ];
use vars qw[ @EXPORT ];

@EXPORT = qw[ 
                DATA_DIR LOG_FILE 
                msg 
            ];

# ================== Configuration ===========================================
use constant DATA_DIR => 'data';
use constant LOG_FILE => DATA_DIR."/parsers.log";

# ================== Logging =================================================

sub msg {
    open (FV, ">>".LOG_FILE) or die "Unable to open file ".LOG_FILE."\n";
    my $time = sprintf "%02d:%02d:%02d", localtime->hour, localtime->min, localtime->sec;
    my $logstr = $time."\t".join("\t", @_)."\n";
    print FV $logstr;
    close FV;
    return $logstr;
}


1; # End of package Parsers